<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'blogMessageBoard.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="css/footer.css">
		<link rel="stylesheet" type="text/css" href="css/blog_header.css">
		<link rel="stylesheet" type="text/css" href="css/blog_top_head.css">
		<link rel="stylesheet" type="text/css"
			href="css/blog_center_right.css">
		<link rel="stylesheet" type="text/css" href="css/blog_person.css">
		<style type="text/css">
body {
	font-size: 12px;
}

* {
	font-size: 12px;
}

/*********************中间部分的样式************************/
.center {
	margin: 20px 0 0 0;
	width: 971px;
	float: left;
	display: inline;
}

/************中间的左边部分的样式**************/
.center_left {
	width: 758px;
	background: white;
	border: solid 1px #CDCDCD;
	margin: 0 10px 0 0;
	display: inline;
	float: left;
}

/*****标题头的样式******/
.center_left_title {
	width: 758px;
	height: 30px;
	background: #F2F2F2;
	text-align: left;
	float: left;
	border-bottom: solid 1px #C2D5E3;
}

.center_left_title b {
	font-family: "宋体";
	font-weight: 600;
	font-size: 14px;
	margin: 0 0 0 10px;
	line-height: 30px;
	color: #444;
}

/******内容的样式*******/
.center_left_context {
	width: 758px;
	float: left;
	display: inline;
	margin: 0px 0 10px 0;
	border-bottom: dashed 1px #CCC;
}

.center_left_context1 {
	width: 758px;
	float: left;
}

.center_left_context1-1 {
	width: 680px;
	height: 20px;
	margin: 6px 0 0px 5px;
	display: inline;
	text-align: left;
	float: left;
	color: #444;
}

.center_left_context2 {
	width: 240px;
	float: left;
}

.center_left_context2-1 {
	width: 240px;
	height: 20px;
	margin: 0px 0 0px 20px;
	display: inline;
	text-align: left;
	float: left;
	color: #555;
}

.center_left_context2-2 {
	width: 240px;
	margin: 0px 0 0px 20px;
	display: inline;
	text-align: left;
	float: left;
	color: #555;
}

.center_left_context2-2-1 {
	width: 240px;
	height: 20px;
	margin: 0px 0 0px 20px;
	display: inline;
	text-align: left;
	float: left;
	color: #555;
}

#saveBtn {
	float: left;
	margin: 0px 0 0 20px;
	display: inline;
}
</style>
		<script type="text/javascript">
function loadRight(id) {
	var blogLookArr = document.getElementsByName("blogLook");
	for ( var i = 0; i < blogLookArr.length; i++) {
		if (blogLookArr[i].value == id) {
			blogLookArr[i].checked = "check";
		}
	}
	var sayLookArr = document.getElementsByName("sayLook");
	for ( var i = 0; i < sayLookArr.length; i++) {
		if (sayLookArr[i].value == id) {
			sayLookArr[i].checked = "check";
		}
	}

	var sayReplArr = document.getElementsByName("sayRepl");
	for ( var i = 0; i < sayReplArr.length; i++) {
		if (sayReplArr[i].value == id) {
			sayReplArr[i].checked = "check";
		}
	}
	var messageBoardLookArr = document.getElementsByName("messageBoardLook");
	for ( var i = 0; i < messageBoardLookArr.length; i++) {
		if (messageBoardLookArr[i].value == id) {
			messageBoardLookArr[i].checked = "check";
		}
	}

	var messageBoardReplArr = document.getElementsByName("messageBoardRepl");
	for ( var i = 0; i < messageBoardReplArr.length; i++) {
		if (messageBoardReplArr[i].value == id) {
			messageBoardReplArr[i].checked = "check";
		}
	}

	var diaryLookArr = document.getElementsByName("diaryLook");
	for ( var i = 0; i < diaryLookArr.length; i++) {
		if (diaryLookArr[i].value == id) {
			diaryLookArr[i].checked = "check";
		}
	}

	var diaryReplArr = document.getElementsByName("diaryRepl");
	for ( var i = 0; i < diaryReplArr.length; i++) {
		if (diaryReplArr[i].value == id) {
			diaryReplArr[i].checked = "check";
		}
	}
	
}
</script>
	</head>
	<body>

		<div class="tbody">
			<%@ include file="styleJsp/blog_top_head.jsp"%>
			<div class="table">
				<%@ include file="styleJsp/blog_header.jsp"%>
				<form action="updateUserBlogRightAction?userId=${param.userId}" method="post">
					<div class="center">
						<div class="center_left">
							<div class="center_left_title">
								<b>空间访问设置</b>
							</div>
							<!-- 空间设置 -->
							<div class="center_left_context">
								<div class="center_left_context1">
									<span class="center_left_context1-1">空间访问权限设置</span>
								</div>
								<!-- 空间-查看 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">访问设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="blogLook" 
													value="4" />
												允许所有人访问
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="blogLook" value="5" />
												仅允许好友访问
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="blogLook" value="6" />
												仅允许本人访问
											</label> </span>
									</div>
								</div>
							</div>
							<!-- 说说设置 -->
							<div class="center_left_context">
								<div class="center_left_context1">
									<span class="center_left_context1-1">说说访问权限设置</span>
								</div>
								<!-- 说说-查看 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">查看设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="sayLook" 
													value="9" />
												允许所有人查看
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="sayLook" value="10" />
												仅允许好友查看
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="sayLook" value="11" />
												仅允许本人查看
											</label> </span>
									</div>
								</div>
								<!-- 说说-回复 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">回复设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="sayRepl" 
													value="13" />
												允许所有人回复
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="sayRepl" value="14" />
												仅允许好友回复
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="sayRepl" value="15" />
												禁止任何人回复
											</label> </span>
									</div>
								</div>
							</div>
							<!-- 留言板设置 -->
							<div class="center_left_context">
								<div class="center_left_context1">
									<span class="center_left_context1-1">留言板访问权限设置</span>
								</div>
								<!-- 留言板-查看 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">查看设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="messageBoardLook"
													value="18" />
												允许所有人查看
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="messageBoardLook" value="19" />
												仅允许好友查看
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="messageBoardLook" value="20" />
												仅允许本人查看
											</label> </span>
									</div>
								</div>
								<!-- 留言板-回复 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">回复设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="messageBoardRepl"
												 value="22" />
												允许所有人留言
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="messageBoardRepl" value="23" />
												仅允许好友留言
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="messageBoardRepl" value="24" />
												禁止任何人留言
											</label> </span>
									</div>
								</div>
							</div>
							<!-- 日志设置 -->
							<div class="center_left_context">
								<div class="center_left_context1">
									<span class="center_left_context1-1">日志访问权限设置</span>
								</div>
								<!-- 日志-查看 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">查看设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="diaryLook" 
													value="27" />
												允许所有人查看
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="diaryLook" value="28" />
												仅允许好友查看
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="diaryLook" value="29" />
												仅允许本人查看
											</label> </span>
									</div>
								</div>
								<!-- 日志-回复 -->
								<div class="center_left_context2">
									<span class="center_left_context2-1">回复设置</span>
									<div class="center_left_context2-2">
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="diaryRepl" 
													value="31" />
												允许所有人评论
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="diaryRepl" value="32" />
												仅允许好友评论
											</label> </span>
										<span class="center_left_context2-2-1"><label>
												<input type="radio" name="diaryRepl" value="33" />
												禁止任何人评论
											</label> </span>
									</div>
								</div>
							</div>
							<div id="saveBtn">
								<input type="submit" value="保存" />
								<input type="button" value="取消">
							</div>
						</div>
				</form>
				<s:iterator value="blogRights">
					<script type="text/javascript">
loadRight(<s:property value="rightTotal.rightId"/>);
	</script>
				</s:iterator>
				<%@ include file="styleJsp/blog_center_right.jsp"%>
			</div>
			<%@ include file="styleJsp/footer.jsp"%>
		</div>
		</div>
	</body>
</html>
